/**
 * \file fpu.h
 * \brief Processor FPU context save/restore
 * \author Corey Tabaka
 */

/*
   Copyright 2005 Corey Tabaka

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

#ifndef __KERNEL_FPU_H__
#define __KERNEL_FPU_H__

#include <ktypes.h>

#define FPU_CONTEXT_SIZE 108

enum {
	FPU_STATE_UNUSED=0,
	FPU_STATE_USED=1,
	FPU_STATE_SAVED=2,
};

typedef byte fpu_context_t[512];

extern "C" {

void fpu_init(void);
void fpu_save(fpu_context_t *);
void fpu_restore(fpu_context_t *);
void fpu_save_sse(fpu_context_t *);
void fpu_restore_sse(fpu_context_t *);

}

#endif
